package com.xyz.app.controller;

import com.free.common.vo.ResultModel;
import com.xyz.domain.model.RestPwdModel;
import com.xyz.service.RestPwdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class RestPwdController {

    @Autowired
    private RestPwdService service;

    @RequestMapping("/restPwd.json")
    @ResponseBody
    public ResultModel restPwd(RestPwdModel restPwdModel){
        return service.restPwd(restPwdModel);
    }

    @RequestMapping("/phoneValid.json")
    @ResponseBody
    public ResultModel phoneValid(RestPwdModel restPwdModel){
        return service.isPhoneValid(restPwdModel);
    }
}
